package com.ossjk.qlh.system.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ossjk.core.base.entity.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 登录记录
 * 
 * @Author Datou
 * @Version 1.0, 2020-04-18
 * @See
 * @Since com.ossjk.qlh.system.entity
 * @Description: TODO
 */
@ApiModel(value = "登录记录")
public class Loginrecord extends BaseEntity<Loginrecord> {

	private static final long serialVersionUID = 1L;

	/**
	 * 用户id
	 */
	@ApiModelProperty(value = "用户id", required = true)
	@TableField("uid")
	private String uid;
	/**
	 * 登录ip
	 */
	@ApiModelProperty(value = "登录ip", required = true)
	@TableField("ip")
	private String ip;
	/**
	 * 客户端
	 */
	@ApiModelProperty(value = "客户端", required = true)
	@TableField("useragent")
	private String useragent;
	/**
	 * 登录时间
	 */
	@ApiModelProperty(value = "登录时间", required = true)
	@TableField("logintime")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date logintime;
	/**
	 * 登录结果 1-成功、2-失败
	 */
	@ApiModelProperty(value = "登录结果 1-成功、2-失败", required = true)
	@TableField("loginresult")
	private Integer loginresult;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getUseragent() {
		return useragent;
	}

	public void setUseragent(String useragent) {
		this.useragent = useragent;
	}

	public Date getLogintime() {
		return logintime;
	}

	public void setLogintime(Date logintime) {
		this.logintime = logintime;
	}

	public Integer getLoginresult() {
		return loginresult;
	}

	public void setLoginresult(Integer loginresult) {
		this.loginresult = loginresult;
	}

	public Date getCrtm() {
		return crtm;
	}

	public void setCrtm(Date crtm) {
		this.crtm = crtm;
	}

	public Date getMdtm() {
		return mdtm;
	}

	public void setMdtm(Date mdtm) {
		this.mdtm = mdtm;
	}

	public String getCrer() {
		return crer;
	}

	public void setCrer(String crer) {
		this.crer = crer;
	}

	public String getMder() {
		return mder;
	}

	public void setMder(String mder) {
		this.mder = mder;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Loginrecord{" + ", id=" + id + ", uid=" + uid + ", ip=" + ip + ", useragent=" + useragent + ", logintime=" + logintime + ", loginresult=" + loginresult + ", crtm=" + crtm + ", mdtm=" + mdtm + ", crer=" + crer + ", mder=" + mder + "}";
	}
}
